Optimal. Leaf size=357 \[ \frac {2 \left (b^2 \left (c e f^3+a d g^3\right )-2 a c \left (c f^2 (e f-3 d g)-a g^2 (3 e f-d g)\right )-b \left (c^2 d f^3+a^2 e g^3+3 a c f g (e f+d g)\right )-\left (2 c^3 d f^3-b^2 (b d-a e) g^3+c g^2 \left (3 b^2 d f-3 a b e f+3 a b d g-2 a^2 e g\right )+c^2 f (6 a g (e f-d g)-b f (e f+3 d g))\right ) x\right )}{c \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {g^3 \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{c^{3/2} e}+\frac {(e f-d g)^3 \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{e \left (c d^2-b d e+a e^2\right )^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.32, antiderivative size = 357, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {1660, 857, 635,
212, 738} \begin {gather*} \frac {2 \left (-x \left (c g^2 \left (-2 a^2 e g+3 a b d g-3 a b e f+3 b^2 d f\right )-b^2 g^3 (b d-a e)+c^2 f (6 a g (e f-d g)-b f (3 d g+e f))+2 c^3 d f^3\right )-b \left (a^2 e g^3+3 a c f g (d g+e f)+c^2 d f^3\right )+b^2 \left (a d g^3+c e f^3\right )-2 a c \left (c f^2 (e f-3 d g)-a g^2 (3 e f-d g)\right )\right )}{c \left (b^2-4 a c\right ) \sqrt {a+b x+c x^2} \left (a e^2-b d e+c d^2\right )}+\frac {g^3 \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{c^{3/2} e}+\frac {(e f-d g)^3 \tanh ^{-1}\left (\frac {-2 a e+x (2 c d-b e)+b d}{2 \sqrt {a+b x+c x^2} \sqrt {a e^2-b d e+c d^2}}\right )}{e \left (a e^2-b d e+c d^2\right )^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 635
Rule 738
Rule 857
Rule 1660
Rubi steps
\begin {align*} \int \frac {(f+g x)^3}{(d+e x) \left (a+b x+c x^2\right )^{3/2}} \, dx &=\frac {2 \left (b^2 \left (c e f^3+a d g^3\right )-2 a c \left (c f^2 (e f-3 d g)-a g^2 (3 e f-d g)\right )-b \left (c^2 d f^3+a^2 e g^3+3 a c f g (e f+d g)\right )-\left (2 c^3 d f^3-b^2 (b d-a e) g^3+c g^2 \left (3 b^2 d f-3 a b e f+3 a b d g-2 a^2 e g\right )+c^2 f (6 a g (e f-d g)-b f (e f+3 d g))\right ) x\right )}{c \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}-\frac {2 \int \frac {\frac {\left (b^2-4 a c\right ) \left (d (b d-a e) g^3-c f \left (e^2 f^2-3 d e f g+3 d^2 g^2\right )\right )}{2 c \left (c d^2-b d e+a e^2\right )}-\frac {\left (b^2-4 a c\right ) g^3 x}{2 c}}{(d+e x) \sqrt {a+b x+c x^2}} \, dx}{b^2-4 a c}\\ &=\frac {2 \left (b^2 \left (c e f^3+a d g^3\right )-2 a c \left (c f^2 (e f-3 d g)-a g^2 (3 e f-d g)\right )-b \left (c^2 d f^3+a^2 e g^3+3 a c f g (e f+d g)\right )-\left (2 c^3 d f^3-b^2 (b d-a e) g^3+c g^2 \left (3 b^2 d f-3 a b e f+3 a b d g-2 a^2 e g\right )+c^2 f (6 a g (e f-d g)-b f (e f+3 d g))\right ) x\right )}{c \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {g^3 \int \frac {1}{\sqrt {a+b x+c x^2}} \, dx}{c e}+\frac {(e f-d g)^3 \int \frac {1}{(d+e x) \sqrt {a+b x+c x^2}} \, dx}{e \left (c d^2-b d e+a e^2\right )}\\ &=\frac {2 \left (b^2 \left (c e f^3+a d g^3\right )-2 a c \left (c f^2 (e f-3 d g)-a g^2 (3 e f-d g)\right )-b \left (c^2 d f^3+a^2 e g^3+3 a c f g (e f+d g)\right )-\left (2 c^3 d f^3-b^2 (b d-a e) g^3+c g^2 \left (3 b^2 d f-3 a b e f+3 a b d g-2 a^2 e g\right )+c^2 f (6 a g (e f-d g)-b f (e f+3 d g))\right ) x\right )}{c \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {\left (2 g^3\right ) \text {Subst}\left (\int \frac {1}{4 c-x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )}{c e}-\frac {\left (2 (e f-d g)^3\right ) \text {Subst}\left (\int \frac {1}{4 c d^2-4 b d e+4 a e^2-x^2} \, dx,x,\frac {-b d+2 a e-(2 c d-b e) x}{\sqrt {a+b x+c x^2}}\right )}{e \left (c d^2-b d e+a e^2\right )}\\ &=\frac {2 \left (b^2 \left (c e f^3+a d g^3\right )-2 a c \left (c f^2 (e f-3 d g)-a g^2 (3 e f-d g)\right )-b \left (c^2 d f^3+a^2 e g^3+3 a c f g (e f+d g)\right )-\left (2 c^3 d f^3-b^2 (b d-a e) g^3+c g^2 \left (3 b^2 d f-3 a b e f+3 a b d g-2 a^2 e g\right )+c^2 f (6 a g (e f-d g)-b f (e f+3 d g))\right ) x\right )}{c \left (b^2-4 a c\right ) \left (c d^2-b d e+a e^2\right ) \sqrt {a+b x+c x^2}}+\frac {g^3 \tanh ^{-1}\left (\frac {b+2 c x}{2 \sqrt {c} \sqrt {a+b x+c x^2}}\right )}{c^{3/2} e}+\frac {(e f-d g)^3 \tanh ^{-1}\left (\frac {b d-2 a e+(2 c d-b e) x}{2 \sqrt {c d^2-b d e+a e^2} \sqrt {a+b x+c x^2}}\right )}{e \left (c d^2-b d e+a e^2\right )^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 4.03, size = 354, normalized size = 0.99 \begin {gather*} \frac {2 \left (-b^3 d g^3 x+b^2 \left (a g^3 (-d+e x)+c \left (-e f^3+3 d f g^2 x\right )\right )+b \left (a^2 e g^3+c^2 f^2 (-e f x+d (f-3 g x))+3 a c g (e f (f-g x)+d g (f+g x))\right )+2 c \left (c^2 d f^3 x+a^2 g^2 (d g-e (3 f+g x))+a c f (-3 d g (f+g x)+e f (f+3 g x))\right )\right )}{c \left (-b^2+4 a c\right ) \left (c d^2+e (-b d+a e)\right ) \sqrt {a+x (b+c x)}}+\frac {2 (-e f+d g)^3 \tan ^{-1}\left (\frac {\sqrt {c} (d+e x)-e \sqrt {a+x (b+c x)}}{\sqrt {-c d^2+e (b d-a e)}}\right )}{e \sqrt {-c d^2+e (b d-a e)} \left (c d^2+e (-b d+a e)\right )}-\frac {g^3 \log \left (c e \left (b+2 c x-2 \sqrt {c} \sqrt {a+x (b+c x)}\right )\right )}{c^{3/2} e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(739\) vs.
\(2(339)=678\).
time = 0.14, size = 740, normalized size = 2.07
method | result | size |
default | \(\frac {g \left (g^{2} e^{2} \left (-\frac {x}{c \sqrt {c \,x^{2}+b x +a}}-\frac {b \left (-\frac {1}{c \sqrt {c \,x^{2}+b x +a}}-\frac {b \left (2 c x +b \right )}{c \left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}\right )}{2 c}+\frac {\ln \left (\frac {\frac {b}{2}+c x}{\sqrt {c}}+\sqrt {c \,x^{2}+b x +a}\right )}{c^{\frac {3}{2}}}\right )+\left (-d e \,g^{2}+3 e^{2} f g \right ) \left (-\frac {1}{c \sqrt {c \,x^{2}+b x +a}}-\frac {b \left (2 c x +b \right )}{c \left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}\right )+\frac {2 d^{2} g^{2} \left (2 c x +b \right )}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}-\frac {6 d e f g \left (2 c x +b \right )}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}+\frac {6 e^{2} f^{2} \left (2 c x +b \right )}{\left (4 a c -b^{2}\right ) \sqrt {c \,x^{2}+b x +a}}\right )}{e^{3}}+\frac {\left (-d^{3} g^{3}+3 d^{2} e f \,g^{2}-3 d \,e^{2} f^{2} g +e^{3} f^{3}\right ) \left (\frac {e^{2}}{\left (a \,e^{2}-b d e +c \,d^{2}\right ) \sqrt {c \left (x +\frac {d}{e}\right )^{2}+\frac {\left (e b -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}-\frac {\left (e b -2 c d \right ) e \left (2 c \left (x +\frac {d}{e}\right )+\frac {e b -2 c d}{e}\right )}{\left (a \,e^{2}-b d e +c \,d^{2}\right ) \left (\frac {4 c \left (a \,e^{2}-b d e +c \,d^{2}\right )}{e^{2}}-\frac {\left (e b -2 c d \right )^{2}}{e^{2}}\right ) \sqrt {c \left (x +\frac {d}{e}\right )^{2}+\frac {\left (e b -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}-\frac {e^{2} \ln \left (\frac {\frac {2 a \,e^{2}-2 b d e +2 c \,d^{2}}{e^{2}}+\frac {\left (e b -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}\, \sqrt {c \left (x +\frac {d}{e}\right )^{2}+\frac {\left (e b -2 c d \right ) \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{\left (a \,e^{2}-b d e +c \,d^{2}\right ) \sqrt {\frac {a \,e^{2}-b d e +c \,d^{2}}{e^{2}}}}\right )}{e^{4}}\) | \(740\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (f + g x\right )^{3}}{\left (d + e x\right ) \left (a + b x + c x^{2}\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (f+g\,x\right )}^3}{\left (d+e\,x\right )\,{\left (c\,x^2+b\,x+a\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________